<ng-template #list>
  <apes-upload-list
    #listComp
    [style.display]="apesShowUploadList ? '' : 'none'"
    [locale]="locale"
    [listType]="apesListType"
    [items]="apesFileList || []"
    [icons]="apesShowUploadList"
    [iconRender]="apesIconRender"
    [previewFile]="apesPreviewFile"
    [onPreview]="apesPreview"
    [onRemove]="onRemove"
    [onDownload]="apesDownload">
  </apes-upload-list>
</ng-template>
<ng-template #con><ng-content></ng-content></ng-template>
<ng-template #btn>
  <div [ngClass]="classList" [style.display]="apesShowButton ? '' : 'none'">
    <div apes-upload-btn #uploadComp [options]="_btnOptions">
      <ng-template [ngTemplateOutlet]="con"></ng-template>
    </div>
  </div>
</ng-template>
<ng-container *ngIf="apesType === 'drag'; else select">
  <div [ngClass]="classList"
    (drop)="fileDrop($event)"
    (dragover)="fileDrop($event)"
    (dragleave)="fileDrop($event)">
    <div apes-upload-btn #uploadComp [options]="_btnOptions" class="{{prefixCls}}-btn">
      <div class="{{prefixCls}}-drag-container">
        <ng-template [ngTemplateOutlet]="con"></ng-template>
      </div>
    </div>
  </div>
  <ng-template [ngTemplateOutlet]="list"></ng-template>
</ng-container>
<ng-template #select>
  <ng-container *ngIf="apesListType === 'picture-card'; else pic">
    <ng-template [ngTemplateOutlet]="list"></ng-template>
    <ng-template [ngTemplateOutlet]="btn"></ng-template>
  </ng-container>
</ng-template>
<ng-template #pic>
  <ng-template [ngTemplateOutlet]="btn"></ng-template>
  <ng-template [ngTemplateOutlet]="list"></ng-template>
</ng-template>
